﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using C4F.DevKit.Speech;

namespace SpeechApplication
{
    public partial class SpeechSettings : Form
    {
        
        #region Constructors

        public SpeechSettings(SapiManager manager)
        {
            InitializeComponent();
            this.speechSettings1.SapiManager = manager;
        }

        #endregion Constructors

        #region Methods

        #region Event Handlers

        private void speechSettings1_SettingsApplied(object sender, EventArgs e)
        {
            this.CloseForm();
        }

        private void speechSettings1_SettingsCanceled(object sender, EventArgs e)
        {
            this.CloseForm();
        }

        private void SpeechSettings_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Escape)
                this.CloseForm();
        }

        #endregion Event Handlers

        #region Private

        private void CloseForm() {
            this.Close();
        }

        #endregion Private

 
        #endregion Methods
    }
}
